<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:a="http://richfaces.org/a4j"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich" xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core" xmlns:a4j="http://richfaces.org/a4j" template="/layout/contentLayout.xhtml">

	<ui:param name="param_pageTitle" value="#{messages.luyuan_crm_menu_order}" />
	<ui:param name="param_navigationUrl" value="/luyuan/task/navigationTask.jsf" />

	<ui:define name="road">
		<span><h:outputLink value="">产品</h:outputLink> </span>
	</ui:define>

	<!-- content -->
	<ui:define name="content">
		<h:form id="productForm">
			<rg:areaPanel>
				<rg:areaPanel type="searchPanel" style="margin-top: 10px;">
					<rg:fieldSet column="auto" labelWidth="80px">
						<rg:selectOne id="sTaskStatus" label="任务状态" value="#{taskDailyAction.criteria.taskStatus}" enableEmpty="true"
							converter="#{taskDailyStatusConverter}" itemsProvider="#{taskDailyStatusProvider}" />
						<rg:field label="执行时间">
							<rg:datetime value="#{taskDailyAction.startDate}" datePattern="yyyy-MM-dd" showApplyButton="false" />
							至
							<rg:datetime value="#{taskDailyAction.endDate}" datePattern="yyyy-MM-dd" showApplyButton="false" />
						</rg:field>
						<rg:field>
							<h:commandButton styleClass="button" value="搜索" />
						</rg:field>
					</rg:fieldSet>
				</rg:areaPanel>
				<rg:titlePanel headerTitle="任务列表" style="margin-top: 10px;" needButton="true" readonly="false">
					<ui:define name="headerActions">
						<h:commandLink onclick="UI.instance.showDialog({id:'addTaskDaily', src:'/luyuan/task/addTaskDaily.jsf'});"
							value="增加" />
					</ui:define>
					<rg:table tableId="taskDailyTable" value="#{taskDailyAction.tableModel}" var="item">
						<rg:column property="customer.name" title="#{messages.luyuan_member_name}" sortable="false" />
						<rg:column property="customer.gender" title="性别" converter="#{genderConverter}" sortable="false" />
						<rg:column property="customer.mobile" title="#{messages.luyuan_member_mobile}" sortable="false" />
						<rg:column property="customer.memberIntegral.memberLevel" converter="#{memberLevelConverter}" title="会员等级"
							sortable="false" />
						<rg:column property="customer.memberGroups" title="会员类别" converter="#{memberGroupsConverter}" sortable="false" />
						<rg:column property="customer.liveness" title="会员状态" messagePrefix="luyuan_crm_member_liveness_"
							converter="#{messageConverter}" sortable="false" />
						<rg:column property="customer.loyalty" title="忠诚度" messagePrefix="luyuan_crm_member_loyalty_"
							converter="#{messageConverter}" sortable="false" />
						<rg:column property="expectedTime" title="执行时间" converter="#{dateConverter}" datePattern="yyyy-MM-dd"
							sortable="false" />
						<rg:column property="description" title="任务描述" sortable="false" />
						<rg:column property="taskStatus" title="任务状态" sortable="false" messagePrefix="luyuan_task_TaskDailyStatus_"
							converter="#{messageConverter}" />
						<rg:column cellType="oper" title="#{messages.crud_tbl_operate_label}">
							<ul class="links">
								<li><h:outputLink value="javascript:void(0);"
										onclick="UI.instance.showDialog({id:'executeTaskDaily', src:'/luyuan/task/updateTaskDaily.jsf?id=#{item.id}'});">修改任务</h:outputLink>
								</li>
								<li><h:outputLink value="javascript:void(0);"
										onclick="UI.instance.showDialog({id:'executeTaskDaily', src:'/luyuan/task/executeTaskDaily.jsf?id=#{item.id}'});">执行任务</h:outputLink>
								</li>
							</ul>
						</rg:column>
					</rg:table>
				</rg:titlePanel>
			</rg:areaPanel>
		</h:form>
		<a:form>
			<a:jsFunction name="reRenderTaskDailyTable" reRender="taskDailyTable" />
		</a:form>
	</ui:define>
</ui:composition>